﻿#include "TcpListener.h"

#include "TcpIOer.h"

TcpListener::TcpListener() : QTcpServer()
{
}

TcpListener::~TcpListener()
{
}

void TcpListener::incomingConnection(qintptr socketDescriptor)
{
  TcpIOer *tCPSocket = new TcpIOer();
  tCPSocket->setSocketDescriptor(socketDescriptor,QTcpSocket::ConnectedState,QTcpSocket::ReadWrite);
  emit signal_newConnection(tCPSocket); //发送新TCP连接
}
